in-context learning
MapPFN: Learning Causal Perturbation Maps in Context
Sextro, Marvin, Kłos, Weronika, Dernbach, Gabriel
Planning effective interventions in biological systems requires treatment-effect models that adapt to unseen biological contexts by identifying their specific underlying mechanisms. Yet single-cell perturbation datasets span only a handful of biological contexts, and existing methods cannot leverage new interventional evidence at inference time to adapt beyond their training data. To meta-learn a perturbation effect estimator, we present MapPFN, a prior-data fitted network (PFN) pre-trained on a synthetic biological prior with causal interventions, decoupling pre-training from limited wet-lab data. Unlike existing methods, MapPFN uses in-context learning to map a sequence of experiments to a post-perturbation distribution, enabling a single pre-trained model to adapt to new datasets and gene sets. Our results show that combining synthetic pre-training with fine-tuning on real single-cell data improves perturbation predictions across biological contexts. The code, model and data are available at https://marvinsxtr.github.io/MapPFN.
In-Context Multi-Operator Learning with DeepOSets
Chiu, Shao-Ting, Nambiar, Aditya, Syed, Ali, Siegel, Jonathan W., Braga-Neto, Ulisses
An important application of neural networks in scientific computing is non-linear operator learning. In this framework, a neural network is trained to fit a non-linear map between infinite dimensional spaces, for example, the solution operator of ordinary and partial differential equations. Recently, inspired by the discovery of in-context learning for large language models, an even more ambitious paradigm has been explored, called multi-operator learning. In this approach, a neural network is trained to learn many different operators at the same time. At inference time, the network is passed a small number of example input and output pairs to disambiguate the desired operator. In this work, we provide a precise mathematical formulation of the multi-operator learning problem, propose a parameter-efficient, attention-free architecture, called DeepOSets, and prove its universality in the in-context multi-operator learning task. We perform experiments demonstrating the efficacy of DeepOSets on several benchmarks, including Burgers' equation, 1D and 2D Darcy flow, and a variety of initial-value and boundary-value differential equations. In a comparison with the transformer-based ICON model on the 1D Darcy problem, under a small training budget (10k steps), DeepOSets attained lower error at every context size with 19% of the parameters, while with an extended budget (100k steps), ICON attains 26-41% lower error, but at the cost of roughly 218$\times$ more training time, 12$\times$ higher inference latency, and 5.3$\times$ more parameters.
Recursive Reasoning or Statistical Extrapolation? In-Context Learning in Multi-Agent Interdependent Decision-Making
Liu, Yu, Li, Wenwen, Dou, Yifan, Ye, Guangnan
In-context learning (ICL) enables large language model (LLM) agents to improve decisions using interaction history, yet it remains unclear whether such improvement reflects refined internal reasoning or mere extrapolation of statistical patterns. To disentangle these mechanisms, we study LLM agents in multi-agent incomplete-information games that require recursive belief reasoning. By constructing a public goods game and manipulating the statistical structure of historical feedback, we evaluate decision quality against a history-independent rational expectations equilibrium (REE) benchmark. Our experiments reveal that when historical statistical patterns are disrupted, the benefits of longer context largely vanish, degrading decision quality to the no-context baseline in a way sharply amplified by stronger strategic interdependence. These results suggest that, in such strategic environments, ICL behavior is more consistent with statistical extrapolation than with strategic reasoning. Our work extends the mechanistic study of ICL to strategic multi-agent settings, introduces REE as a diagnostic tool for distinguishing reasoning from extrapolation, and provides a reusable framework for probing the boundaries of LLM reasoning in recursive belief tasks.
In-Context Bias Propagation in LLM-Based Tabular Data Generation
Recasens, Pol G., Gutierrez, Alberto, Torres, Jordi, Berral, Josep. Ll, Carnerero-Cano, Javier, Halimi, Anisa, Fraser, Kieran
Large Language Models (LLMs) are increasingly used for synthetic tabular data generation through in-context learning (ICL), offering a practical solution for data augmentation in data scarce scenarios. While prior work has shown the potential of LLMs to improve downstream task performance through augmenting underrepresented groups, these benefits often assume access to a subset of unbiased in-context examples, representative of the real dataset. In real-world settings, however, data is frequently noisy and demographically skewed. In this paper, we systematically study how statistical biases within in-context examples propagate to synthetic tabular data, showing that even mild in-context biases lead to global statistical distortions. We further introduce an adversarial scenario where a malicious contributor can inject bias into the synthetic dataset via a subset of in-context examples, ultimately compromising the fairness of downstream classifiers for a targeted and protected subgroup. Finally, we evaluate prompt-side mitigation strategies based on preprocessing in-context examples and instruction-based defenses, demonstrating that while such techniques can attenuate disparity, the inherent sensitivity of LLMs to adversarial prompts remains a persistent challenge. Our findings highlight a critical new vulnerability in LLM-based data generation pipelines within sensitive domains.
Transformers as Adaptive Kernel Learners across Tasks for In-Context Learning
Shen, Zhaiming, Cloninger, Alexander, Lai, Rongjie, Liao, Wenjing
Transformers have emerged as a dominant architecture in modern machine learning, with in-context learning (ICL) enabling models to adapt to new tasks by conditioning on prompts, without any parameter updates. To understand the attention mechanism in transformer blocks, a growing line of theoretical work interprets ICL through the lens of classical statistical estimators. Recent works have established a connection between the attention mechanism and kernel methods, while the kernel function is usually assumed to be fixed. In practice, the query and key matrices in the attention mechanism are trained, which allows the attention mechanism to serve as an adaptive kernel method. In this work, we demonstrate that transformers can act as adaptive anisotropic kernel learners. Specifically, we study ICL for low-rank linear and multi-index nonlinear regressions, and conduct numerical simulations to show that the learned attention scores closely resemble the oracle kernels for these function classes. We then develop a general framework to analyze the generalization error of ICL by connecting transformers to the oracle kernel estimator for each function class. Our theory gives an explicit and constructive implementation of the oracle kernel estimators for these function classes using a wide and shallow transformer architecture, illustrating how the prediction is carried out by the interaction between the query token and the context tokens. Our work complements existing studies by providing numerical and theoretical evidence of how the attention mechanism adapts to anisotropic kernels in both linear and nonlinear settings.
What Makes Good Instruction-Tuning Data? An In-Context Learning Perspective
Han, Guangzeng, Huang, Xiaolei
Abstractimproving instruction-following ability, but assembling high-quality tuning datasets is costly. Data seInstruction-tuning datasets often contain sub-lection methods like Superfiltering (Li et al., 2024a) stantial redundancy and low-quality samples, use model perplexity to prune simple examples, necessitating effective data selection methods. We propose an instruction data selectionand DEITA (Liu et al., 2024b) apply learned reframework based on weighted in-context influ-ward models to rank and filter instruction-response ence (wICI), which measures how effectivelypairs based on human-aligned quality signals. Through systematic experiments, weform well in in-context learning and those that address three key questions: what constitutesconstitute valuable instruction-tuning data remains effective instruction tuning data from an inunderexplored. Recognizing this gap, (Li et al.,context perspective, whether sample difficulty correlates with in-context influence, and how 2024c) made a pioneering attempt in NUGGETS in-context influence translates to instructionto bridge in-context learning and instruction tuntuning effectiveness. While NUGGETS made 1 Introductionsignificant progress in this direction, we explore how this paradigm can be further advanced.
What Can Language Models Inherit from Solomonoff Induction? Limits, Attainable Properties, and What Served Conditionals Reveal
Ozelim, Luan, Uthamacumaran, Abicumaran, Zenil, Hector
A familiar line of reasoning runs as follows: language models are flexible approximators trained under a strictly proper loss, so scale brings them closer to Solomonoff induction, and their predictive success is evidence of that approach. We apply known results from algorithmic information theory, universal prediction and Bayesian consistency. In its uniform form the conclusion holds for no computable model: each has cheap environments it never learns, and every uniformly computable family of total predictors shares one on which each member fails beyond a horizon growing with its index, so ``closer'' can hold only pointwise, one environment at a time. Nor could the offered routes certify even that: finite evaluation cannot certify agreement on rarely reached contexts, perfect corpus fit selects the corpus law as prior, and asymptotic criteria cannot see the constants that carry Solomonoff's guarantee. Our lens is the Kraft inequality read for predictors. Every model has at most the same budget of predictive success, so Solomonoff's predictor, which leaves part of it unspent, differs from a language model not in having more of it but in where it spends it; on mutually singular families this is exact, and only full-mass Bayes mixtures reach the frontier. We then discuss what is inheritable, including in-context learning as amortised Bayesian inference; what survives within a context window; which Solomonoff-like properties a deployed system should have or avoid; and what served conditionals determine. A closing table states what common practices certify and what to report. Tests are developed in a companion paper.
An all-transistor physical-learning transformer can be trained to perform in-context learning
Abbott, Michael C., Machta, Benjamin B.
Most systems trained by equilibrium propagation or coupled learning are in the same class as multi-layer perceptrons: while they may be universal function approximators, they struggle to learn associative tasks which are easy for transformers. Equilibrium propagation relies on a bidirectional flow of information through the physical system between input and output. The reverse flow is broken by more complex nonlinear systems, such as those performing multiplication which is needed to express dot-product attention. Here we explicitly restore this bidirectional flow by introducing extra circuit elements for this purpose into a double or dyadic circuit. We then use these ideas to construct an attention mechanism exploiting the exponential current law of sub-threshold MOSFET devices. We show that in simulations this circuit can be trained to perform a simple in-context learning task, despite using realistic reverse components which transmit only an approximate gradient. For this training to succeed we need cross-entropy loss (not mean squared error). We generate nudges appropriate for this loss using a novel floating circuit element, based on the same MOSFET sub-circuit used for softmax. We train the resistors in this circuit using the Lion optimiser, which can be implemented using one capacitor per parameter to store local memory of past gradient estimates.
Bimanual Robot Manipulation via Multi-Agent In-Context Learning
Palma, Alessio, Spinelli, Indro, Prasad, Vignesh, Scofano, Luca, Jin, Yufeng, Chalvatzaki, Georgia, Galasso, Fabio
Bimanual manipulation is a cornerstone capability for general-purpose robotic systems. Tasks such as lifting a tray or unscrewing a bottle cap require two arms to synchronize positions, orientations, and forces. This coordination is harder than single-arm control: errors in one arm force the other to compensate, the joint action space grows rapidly, and strict temporal synchronization is required [1, 2, 3, 4]. As a result, Imitation Learning (IL) and offline Reinforcement Learning (RL) typically demand large, task-specific datasets to capture these dependencies. In-Context Learning (ICL) with foundation models offers a compelling alternative: adapting to new robot tasks without any gradient updates. By serializing the scene as text, Large Language Models (LLMs) act as generalist planners, bypassing the need for massive paired image-action datasets. This abstraction trades raw perceptual fidelity for few-shot generalizability, a worthwhile exchange that methods such as RoboPrompt [5] and KAT [6] have validated for single-arm manipulation. Extending this paradigm to bimanual manipulation, however, remains an open problem. A naive strategy of concatenating both arms' commands into a monolithic joint action sequence inflates token length and increases per-step pattern complexity, causing the LLM to produce incoherent plans.
Transformers Can Implement Preconditioned Richardson Iteration for In-Context Gaussian Kernel Regression
Yan, Mingsong, Li, Dongyang, Kulick, Charles, Tang, Sui
In this paper, we study in-context kernel ridge regression (KRR) with Gaussian kernels and show, both theoretically and empirically, that a standard softmax-attention transformer can approximate the KRR predictor during its forward pass. Under bounded-data assumptions, we construct a single-head transformer whose forward pass approximately implements \textit{preconditioned Richardson iteration} on the associated kernel system. The construction uses $O(\log(1/ε))$ blocks and MLP width $O(\sqrt{N/ε})$ to achieve $ε$-accurate prediction for prompts of length $N$. Our construction reveals a functional decomposition within the transformer architecture: softmax attention produces a row-normalized Gaussian-kernel operator needed for \emph{cross-token} interactions, while MLP layers act locally to approximate the \emph{intra-token} scalar arithmetic required by the update. Empirically, we train GPT-2-style transformers on Gaussian-process regression tasks and observe that they progressively align with the exact Gaussian KRR estimator across depth in terms of both \emph{prediction error} and \emph{induced weights}, with ablations further supporting this trend. Comparisons with classical KRR solvers also show that deeper layers align with later solver iterates. Together, we empirically demonstrate that the pretrained transformers exhibit progressive refinement toward exact Gaussian KRR across depth, and theoretically establish inexact preconditioned Richardson iteration as a concrete mechanism for approximating this predictor within an explicitly constructed softmax-attention transformer.